# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Antonio Rojas <arojas@archlinux.org>
# Contributor: djanku <djanku (at) email (dot) cz>

_pipname=flask-babel
pkgname=python-flask-babel
pkgver=3.1.0
pkgrel=1
pkgdesc="Adds i18n/l10n support to Flask applications with the help of the Babel library."
arch=(any)
url="https://pypi.python.org/pypi/flask-babel"
license=(BSD)
depends=(python-flask python-babel python-pytz python-speaklater python-jinja)
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools' 'python-poetry-core')
source=("https://pypi.io/packages/source/${_pipname:0:1}/$_pipname/${_pipname/-/_}-$pkgver.tar.gz")
sha256sums=('be015772c5d7f046f3b99c508dcf618636eb93d21b713b356db79f3e79f69f39')

build() {
  cd ${_pipname/-/_}-$pkgver 
  python -m build --wheel --no-isolation
}

package() {
  cd ${_pipname/-/_}-$pkgver 
  python -m installer --destdir="$pkgdir" dist/*.whl

  mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
  install -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname
}
